package com.ssm.util.test.suiyi;

public class suiyi {
	
	public static void while1() {
		int i=0;
		int j=0;
		while (i<10) {
			j=j*2+i;
			i++;
		}
		System.out.println(j);
	}
	
	public static void dowhile2() {
		int i=0;
		int j=0;
		do {
			j=j*2+i;
			i++;
		} while (i<10);
		System.out.println(j);
	}
	
	public static void if2() {
		int i=1;
		if (i==1) {
			System.out.println(i);
		}
	}
	
	public static void switch2() {
		int i=1;
		switch (i) {
		
			case 1:
				i++;
				System.out.println(i);
				break;
			case 2:
				System.out.println(i);
				break;
			default:
				break;
		}
	}
	public static void for2() {
		int[] array={1,2,1,4,4,7,8,3,6};
		for (int i = 0; i < array.length; i++) {
			System.out.println(array[i]);
		}
	}
	public static void main(String[] args) {
		while1();
		dowhile2();
		if2();
		switch2();
		for2();
	}

}
